/*
 * =====================================================================================
 *
 *       Filename:  1003_hangover.cc
 *
 *    Description:  
 *
 *        Version:  1.0
 *        Created:  09/10/2012 02:55:59 AM
 *       Revision:  none
 *       Compiler:  gcc
 *
 *         Author:  Regan (), lcqhigh@gmail.com
 *        Company:  
 *
 * =====================================================================================
 */
#include	<stdio.h>
#include	<assert.h>

double  splitValue[300];
int     global_maxidx = 0;

void caculateSplitValue()
{
    splitValue[0] = 0.0;
    int i;
    for (i = 1; splitValue[i-1] <= 5.20; ++i)
    {
        double temp = 1.000000 / (i + 1);
        splitValue[i] = splitValue[i-1] + temp;
        //printf ( "%d, %lf\n", i, splitValue[i]);
    }
    global_maxidx = i - 1; 
}

//find the idx that arr[idx-1] < v <= arr[idx]
int binary_double_search(double v, double *arr, int l, int h)
{
    int low = l-1, high = h; 
    while ((high - low) > 1)
    {
        int mid = (high - low) / 2 + low;
        if (v > arr[mid])
            low = mid;
        else 
            high = mid;
    }
    //return low;
    return high;
}

int main(int argc, char *argv[])
{
    caculateSplitValue();
    double v;
    while (scanf("%lf", &v) == 1)
    {
        if (v == 0.00)
            break;
        int idx = binary_double_search(v, splitValue, 1, global_maxidx);
        printf ( "%d card(s)\n", idx);
    }
}
